package com.moduleSys.cms.roleMenu;

import com.moduleSys.entity.system.RoleMenu;
import com.moduleSys.roleMenuService.RoleMenuService;
import com.moduleSys.utils.json.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by czw on 2017/7/22 0022.
 */
@RestController
@RequestMapping(value = "/roleMenu")
public class RoleMenuController {
    @Autowired
    private RoleMenuService roleMenuService;

    @RequestMapping(value = "/saveRoleMenu",method = {RequestMethod.GET,RequestMethod.POST})
    public JsonResult saveRoleMenu(Long roleId,@RequestParam(value = "mId[]",required = false) Long[] mId){
        JsonResult jr = roleMenuService.insert(roleId,mId);
        return  jr;
    }
}
